package io.github.xiaoxing365.jframeIni;

import java.awt.FlowLayout;
import java.awt.LayoutManager;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;

import io.github.xiaoxing365.listeners.ButtonListener;

public class MainFrameIni extends JFrame{
    public MainFrameIni(){
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true);
        setSize(800,600);
        setLocationRelativeTo(null);
        setTitle("BASE64解码器");
        setLayout(new FlowLayout());
        // frame.setLayout();
        IniLabel();
        System.out.println("123");
        
    }

    JLabel label = new JLabel("->");
    JTextField inputText = new JTextField(20);
    JTextField inputText2 = new JTextField(20);
    JButton button = new JButton("开始转换");

    public JButton getButton(){
        return button;
    }
    public JTextField getTextField(){
        return inputText;
    }
    public JTextField getTextField2(){
        return inputText2;
    }
    public JFrame getFrame(){
        return this;
    }

    public void IniLabel(){
        inputText.setLocation(100, 200);
        button.setEnabled(true);
        add(inputText);
        add(label);
        add(inputText2);
        add(button);
        pack();
    }
}
